import time

from selenium.webdriver.common.by import By

from xueqiu_app_po.base.xueqiu_app import XueQiuApp


class AboutPage(XueQiuApp):
    _SETUP = By.XPATH,"//*[@text='检查新版本']"
    _NETWORK = By.XPATH,"//*[@text='网络检测']"
    _SEND = By.XPATH,"//*[@text='发送']"
    _CHA = By.XPATH, "//*[@resource-id = 'android:id/content']/child::*/child::*[2]"
    def click_set_up(self):
        self.find_and_click(*self._SETUP)
        return self

    def click_net_work(self):
        time.sleep(2)

        self.find(*self._NETWORK).click()
        return self.find_and_text(*self._SEND)
